
package com.yuan.servlet;

import com.yuan.hibernate.请假申请DAO;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class getallleaveservlet extends BaseHttpServlet {
    private 请假申请DAO m请假申请DAO = null;
    private List<?> list = null;

    public void doGet(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        super.doGet(request, response);
        m请假申请DAO = new 请假申请DAO();
        String userid = request.getParameter("userid");
        list = m请假申请DAO.findBy申请人(userid);
        mResponse = com.yuan.util.JsonUtils.getFromList(list);
        closeAndClear();
    }

    protected synchronized void closeAndClear() {
        m请假申请DAO = null;
        list = null;
        super.closeAndClear();

    }
}
